"use strict";
cc._RF.push(module, 'e44b4bHZSVOrrkGXr5QgJ3W', 'home');
// javascirpt/home.js

"use strict";

// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
cc.Class({
  "extends": cc.Component,
  properties: {
    myAlert: cc.Prefab
  },
  onLoad: function onLoad() {
    console.log("home页面的"); //预制体创建出来，并没有指定父节点

    this.myAlert = cc.instantiate(this.myAlert); //this.myAlert.parent = this.node

    this.node.addChild(this.myAlert);
    this.myAlert.Y = 20;
    this.myAlert.X = 30;
    this.myAlert.W = 100;
    this.myAlert.H = 100;
    this.myAlert.active = false;
  },
  start: function start() {},
  alertAction: function alertAction() {
    this.myAlert.active = !this.myAlert.active;
  },
  backAction: function backAction() {
    cc.director.loadScene("mian");
  },
  update: function update(dt) {// dt是距离上次刷新的时间 
    //console.log("帧"+dt)
  }
});

cc._RF.pop();